package com.prs.crm.domain.crm;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
/**
 * OA
 * 代理商
 * @author zhoupeng 2012-2-15
 *
 */
@Entity
@Table(name="crm_customer_agent")
public class CustomerAgent extends BaseEntity {
private static final long serialVersionUID = 1L;
	
	@Id@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	private String codes;  //代理商编号
	private String name;  //代理商名称
	@ManyToOne
	private CustomerAddress address; //地址

	
	@ManyToOne
	private CustomerTrade trade; //行业
	@ManyToOne
	private CustomerSource source;  //来源
	
	private String linkman;  //联系人姓名
	private String mobile;   //手机
	private String phone;    //电话
	private String fax;      //传真
	private String emai;     //E-mail
	
	private String mailingaddress;  //通讯地址
	private String postalcode;     //邮政编码
	private String unitwebsite;    //单位网站
	private String unitsize;       //单位规模或人数
	private String yeartrunover;    //年营业额
	private String otherdes;        //其他描述
	
	private String personhead;     //负责人
	private String kbank;   //开户银行
	private String bankcode;  //银行账户
	private String taxnumber;  //税号
	private String person;  //业务人员
	private String shareperson; //共享人员
	//客户
	@OneToMany(fetch=FetchType.LAZY,mappedBy="customerAgent")
	private Set<Customer> customers;
	
	//联系人
	@OneToMany(fetch=FetchType.LAZY,mappedBy="customerAgent")
	private Set<Linkman> linkmans;
	//跟单
	@OneToMany(fetch=FetchType.LAZY,mappedBy="customerAgent")
	private Set<DocumenTary> documenTarys;
	
	
	public Set<DocumenTary> getDocumenTarys() {
		return documenTarys;
	}
	public void setDocumenTarys(Set<DocumenTary> documenTarys) {
		this.documenTarys = documenTarys;
	}
	public Set<Linkman> getLinkmans() {
		return linkmans;
	}
	public void setLinkmans(Set<Linkman> linkmans) {
		this.linkmans = linkmans;
	}
	public Set<Customer> getCustomers() {
		return customers;
	}
	public void setCustomers(Set<Customer> customers) {
		this.customers = customers;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCodes() {
		return codes;
	}
	public void setCodes(String codes) {
		this.codes = codes;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public CustomerAddress getAddress() {
		return address;
	}
	public void setAddress(CustomerAddress address) {
		this.address = address;
	}
	
	public CustomerSource getSource() {
		return source;
	}
	public void setSource(CustomerSource source) {
		this.source = source;
	}
	public String getLinkman() {
		return linkman;
	}
	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	public String getEmai() {
		return emai;
	}
	public void setEmai(String emai) {
		this.emai = emai;
	}
	public String getMailingaddress() {
		return mailingaddress;
	}
	public void setMailingaddress(String mailingaddress) {
		this.mailingaddress = mailingaddress;
	}
	public String getPostalcode() {
		return postalcode;
	}
	public void setPostalcode(String postalcode) {
		this.postalcode = postalcode;
	}
	public String getUnitwebsite() {
		return unitwebsite;
	}
	public void setUnitwebsite(String unitwebsite) {
		this.unitwebsite = unitwebsite;
	}
	public String getUnitsize() {
		return unitsize;
	}
	public void setUnitsize(String unitsize) {
		this.unitsize = unitsize;
	}
	public String getYeartrunover() {
		return yeartrunover;
	}
	public void setYeartrunover(String yeartrunover) {
		this.yeartrunover = yeartrunover;
	}
	public String getOtherdes() {
		return otherdes;
	}
	public void setOtherdes(String otherdes) {
		this.otherdes = otherdes;
	}
	public String getPersonhead() {
		return personhead;
	}
	public void setPersonhead(String personhead) {
		this.personhead = personhead;
	}
	public String getKbank() {
		return kbank;
	}
	public void setKbank(String kbank) {
		this.kbank = kbank;
	}
	public String getBankcode() {
		return bankcode;
	}
	public void setBankcode(String bankcode) {
		this.bankcode = bankcode;
	}
	public String getTaxnumber() {
		return taxnumber;
	}
	public void setTaxnumber(String taxnumber) {
		this.taxnumber = taxnumber;
	}
	public CustomerTrade getTrade() {
		return trade;
	}
	public void setTrade(CustomerTrade trade) {
		this.trade = trade;
	}
	public String getPerson() {
		return person;
	}
	public void setPerson(String person) {
		this.person = person;
	}
	public String getShareperson() {
		return shareperson;
	}
	public void setShareperson(String shareperson) {
		this.shareperson = shareperson;
	}
	
}
